﻿<Window x:Class="LinkViewer.winLinkViewer"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Link Viewer" Height="725" Width="1130"
        xmlns:local="clr-namespace:LinkViewer" 
        xmlns:kyleLib="clr-namespace:KyleLib.Controls"
        xmlns:chr="clr-namespace:Cjc.ChromiumBrowser;assembly=Cjc.ChromiumBrowser"
        xmlns:lvc="clr-namespace:LinkViewer.Controls"
        Icon="../Graphics/transparent.png"
        WindowStartupLocation="CenterScreen" WindowState="Normal">
    
    <Window.Resources>
        <local:LinkWrapper x:Key="links" />
        <kyleLib:UIListPager x:Key="listPager" PageSize="10"></kyleLib:UIListPager>
    </Window.Resources>   
    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF67A6D4" Offset="0"/>
            <GradientStop Color="#FF0E4064" Offset="0.08"/>
            
            <GradientStop Color="#FF67A6D4" Offset="0.828"/>
            <GradientStop Color="#FF0E4064" Offset="1"/>
           
            
        </LinearGradientBrush>
    </Window.Background>
 <!--   <Grid HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>-->
        <DockPanel DataContext="{StaticResource listPager}">
            <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Button x:Name="bRefreshLinks" Margin="3" Padding="4" FontSize="16" Click="bRefreshLinks_Click">Exit Application</Button>
            <Button x:Name="bAreaCodeLookup" Margin="3" Padding="4" FontSize="16" Click="bAreaCodeLookup_Click">Area Code Lookup</Button>
            <Label Foreground="White" Height="32" FontSize="16" Content="Total # of Links:"/>
                <Label x:Name="lblTotalLinks" Foreground="White" Height="29" FontSize="16"/>
                <Label Margin="100,0,5,0" Foreground="White" FontSize="16" Height="32" Content="Browser Height"></Label>
                <TextBox Width="50" Height="28" FontSize="16" VerticalContentAlignment="Center" Name="tbBrowserSize" Text="{Binding Source={x:Static local:Properties.Settings.Default}, Path=BrowserSize, Mode=TwoWay}"></TextBox>
                <Button Name="bBrowserSizeUpdate" FontSize="16" Padding="4" Margin="3" Click="bBrowserSizeUpdate_Click">Save</Button>
                
            </StackPanel>

        <DockPanel DockPanel.Dock="Bottom">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="25"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                
              <!--   <Label Content="Current Page:" Target="{Binding ElementName=CurrentPageSlider}"
                       Grid.Row="0" Grid.Column="0"
                       />
                <TextBlock DockPanel.Dock="Left" Text="{Binding ElementName=CurrentPageIndex}"
                        Grid.Row="0" Grid.Column="1"
                        />
                
               <Slider Grid.Row="0" Grid.Column="2"
                        Name="CurrentPageSlider"
                        Maximum="{Binding Path=MaxPageIndex}"
                        Value="{Binding Path=CurrentPageIndex}"
                        />
                
                <Label Content="Page Size" Target="{Binding ElementName=PageSizeSlider}"
                       Grid.Row="1" Grid.Column="0"/>
                <TextBlock DockPanel.Dock="Left" Text="{Binding Path=PageSize}"
                   Grid.Row="1" Grid.Column="1"/>
                <Slider Grid.Row="1" Grid.Column="2" Name="PageSizeSlider"
                Maximum="200"
                Minimum="1"
                Value="{Binding Path=PageSize}"
            />-->


            </Grid> 
        </DockPanel>
        <Grid DockPanel.Dock="Bottom" HorizontalAlignment="Stretch">
            <Label Name="lblFolderPath" VerticalAlignment="Center" FontSize="20" Foreground="White" Content="Folder Path"/>
            <StackPanel Orientation ="Horizontal" HorizontalAlignment="Right" Margin="0,0,24,0">
               <!-- <Button FontSize="16" Content="&lt;&lt; First" Margin="3" Padding="10" Command="{Binding Path=FirstCommand}" Name="bFirstPage" Click="bFirstPage_Click"/>-->
                <Button FontSize="16" Content="&lt; Prev" Margin="3" Padding="10" Name="bPrevPage" Click="bPrevPage_Click"/>

                <!-- Removed ItemsSource...to revert back, add this ItemsSource="{Binding Path=PageCommands}"-->
                <ComboBox Width="110"  Height="32" Margin="3" Padding="8" Name="cbPages" SelectedIndex="0" SelectionChanged="ComboBox_SelectionChanged"></ComboBox>

                <Button FontSize="16" FontFamily="Segoe UI" Content="Next &gt;" Margin="3" Padding="10" Name="bNextPage" Click="bNextPage_Click"/>
                <Button  FontSize="16" Padding="4" Width="250" Margin="160,3,3,3" Name="bJump" Click="bJump_Click">Jump Down</Button>
               <!-- <Button FontSize="16" Content="Last &gt;&gt;" Margin="3" Padding="10" Command="{Binding Path=LastCommand}" Name="bLastPage" Click="bLastPage_Click"/>-->
            </StackPanel>
        </Grid>
            

        <ScrollViewer Margin="3" BorderThickness="1" BorderBrush="Blue" x:Name="sviewer">
            <StackPanel Orientation="Vertical">
                <lvc:LinkItem x:Name="linkItem1"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem2"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem3"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem4"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem5"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem6"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem7"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem8"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem9"></lvc:LinkItem>
                <lvc:LinkItem x:Name="linkItem10"></lvc:LinkItem>
            </StackPanel>
            
            
            
            
            <!-- Add in CanContentScroll=False for smooth scrolling..purposely taken out for snapping-->
            <!--
                Trying something new yaya!!
                ************************
                *************************
                <ListBox x:Name="test" HorizontalContentAlignment="Stretch" ClipToBounds="False" SnapsToDevicePixels="False" ItemsSource="{Binding Path=CurrentPage}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                                <lvc:LinkItem LinkObject="{Binding}"></lvc:LinkItem>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            
            -->
        </ScrollViewer>
    </DockPanel>  
</Window>
